package org.hnsd.train.pattern.decorator;

/**
 * @author youqd
 * @tag.date 2023-11-07 22:43
 **/
public abstract class Decorator extends Component{
    protected Component component;

    public Decorator(Component component) {
        this.component = component;
    }

    @Override
    public void operation() {
        if(component != null){
            component.operation();
        }
    }
}
